<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        
        .bigbox {
            height: 200px;
            width: 400px;
            /*   overflow: hidden; */
            position: relative;
        }
        
        ul {
            list-style: none;
            width: 1600px;
            height: 200px;
        }
        
        .clearfix::after {
            display: block;
            height: 0;
            content: "";
            clear: both;
        }
        
        li {
            float: left;
            height: 200px;
            width: 400px;
        }
        
        img {
            height: 100%;
            width: 100%;
        }
        
        button {
            background-color: rgba(0, 0, 0, 0.5);
            height: 40px;
            width: 20px;
            position: absolute;
            top: calc(50% - 20px);
            outline: none;
            border: none;
            color: white;
            line-height: 40px;
        }
        
        .left {
            left: 0;
        }
        
        .right {
            right: 0;
        }
    </style>
</head>

<body>
    <div class="bigbox clearfix">
        <ul class="clearfix ul1">
            <li><img src="http://127.0.0.1/static/images/001.png"></li>
            <li><img src="http://127.0.0.1/static/images/002.png"></li>
            <li><img src="http://127.0.0.1/static/images/003.png"></li>
            <li><img src="http://127.0.0.1/static/images/004.png"></li>
        </ul>
        <button class="left">&lt;</button>
        <button class="right">&gt;</button>
    </div>

    <script>
        let ul1 = document.getElementsByTagName('ul')[0]
        let li1 = document.getElementsByTagName('li')
        

        ul1.style.transition = '1s'

        setTimeout(fu, 1000)

        function fu() {
            ul1.style.transition = '1s'
            if (ul1.style.transform == 'translateX(-400px)') {
                ul1.style.transition = null
                ul1.appendChild(li1[0])
                ul1.style.transform = 'translateX(0)'
            } else {
                ul1.style.transform = 'translateX(-400px)'
            }
            setTimeout(fu, 1000)
        }
    </script>
</body>

</html>